summerready = function() {
	notApprove.init();
	notApprove.initlist();
}
var notApprove = {

	init : function() {
		var data = $cache.read("logininfo");
		$service.callAction({
			"viewid" : "com.yonyou.SilverskinApplyController", //部署在MA上的Controller的包名
			"action" : "querySilverskin", //后台Controller的方法名,
			"params" : {
				a : 1,
				b : 2
			}, //自定义参数，json格式
			"callback" : "callBack()", //请求成功后回调js方法
			"error" : "errCallBack()"//请求失败回调的js方法
		})
	},
	bindEVent : function() {
		//返回按钮
		$(".sk_back").click(function(){
			summer.closeWin();
		});
		//刷新按钮
		$(".sk_refresh").click(function(){
			notApprove.init();
		});
		//新增按钮
		$(".sk_add").click(function(){
			summer.openWin({
                "id" : 'silverskinApply',
                "url" : 'html/silverskin/silverskinApply.html',
            });
		})
	},
	initlist : function(billinfo) {
		//var info = billinfo.apply_info;
		var html="";
		var info=[{"pk_apply":"1111","apply_time":"2016-11-27","total_num":"20","apply_no":"201611291111"},
		{"pk_apply":"2222","apply_time":"2016-11-28","total_num":"20","apply_no":"201611292222"},
		{"pk_apply":"3333","apply_time":"2016-11-29","total_num":"20","apply_no":"201611293333"}];
		$(".um-list").html("");
		for (var i = 0; i < info.length; i++) {
			html+='<a href="#"  class="um-list-item sk-list-item"  pk_apply="'+info[i].pk_apply+'">'
                +'		<div class="um-list-item-media">'
                +'		</div>'
                +'		<div class="um-list-item-inner">'
                +'			<div class="um-list-item-body">'
                +'				<div class="um-row f14">'
                +'					<div class="um-xs-6" >'
				+'						申请时间：<span id="apply_time">'+info[i].apply_time+'</span>'
				+'				    </div>'
				+'					<div class="um-xs-6">'
				+'						申请数量：<span id="total_num">'+info[i].total_num+'</span>吨'
				+'					</div>'
				+'					<div class="um-xs-6" style="width :100%">'
				+'						申请单号：<span id="apply_no">'+info[i].apply_no+'</span>'
				+'					</div>'
                +'				</div>'
                +'			</div>'
                +'		</div>'
                +'	</a>'
		}
		$(".um-list").html(html);
		$(".sk-list-item").click(function(){
			var pk_apply=$(this).attr("pk_apply");
			summer.openWin({
                "id" : 'notApprvoeSuppliesInfo',
                "url" : 'html/silverskin/notApprvoeSuppliesInfo.html',
                "pageParam" : {
                    "pk_apply" : pk_apply
                }
            });
		});
	},
}

function callBack(args) {
	notApprove.initlist(args.data.billinfo);
}

function errCallBack(args) {
	alert(args.err_msg);
}
